package com.isoft.entity;

import jakarta.xml.bind.annotation.*;
import lombok.Data;

@Data
@XmlRootElement(name = "MSG")
@XmlAccessorType(XmlAccessType.FIELD)
public class BaseCfieEntity {
    @XmlElement(name = "META")
    private Meta meta;

    @XmlElement(name = "CRFT")
    private Crft crft;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Meta {
        @XmlElement(name = "SNDR")
        private String sender;
        @XmlElement(name = "RCVR")
        private String receiver;
        @XmlElement(name = "SEQN")
        private Long sequenceNumber;
        @XmlElement(name = "DDTM")
        private String dateTime;
        @XmlElement(name = "TYPE")
        private String type;
        @XmlElement(name = "STYP")
        private String subType;
        @XmlElement(name = "MSGID")
        private Long msgId;
        public String getSender() { return sender; }
        public void setSender(String sender) { this.sender = sender; }
        public String getReceiver() { return receiver; }
        public void setReceiver(String receiver) { this.receiver = receiver; }
        public Long getSequenceNumber() { return sequenceNumber; }
        public void setSequenceNumber(Long sequenceNumber) { this.sequenceNumber = sequenceNumber; }
        public String getDateTime() { return dateTime; }
        public void setDateTime(String dateTime) { this.dateTime = dateTime; }
        public String getType() { return type; }
        public void setType(String type) { this.type = type; }
        public String getSubType() { return subType; }
        public void setSubType(String subType) { this.subType = subType; }
        public Long getMsgId() { return msgId; }
        public void setMsgId(Long msgId) { this.msgId = msgId; }
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Crft {
        @XmlElement(name = "CODE")
        private String code;
        @XmlElement(name = "CFTP")
        private String aircraftType;
        @XmlElement(name = "AWCD")
        private String airlineCode;
        @XmlElement(name = "STNM")
        private Integer stationNumber;
        @XmlElement(name = "RSTN")
        private String rstn;
        @XmlElement(name = "CFSA")
        private String cfsa;
        @XmlElement(name = "TTWC")
        private String ttwc;
        @XmlElement(name = "MXLW")
        private String mxlw;
        @XmlElement(name = "RLLW")
        private String rllw;
        public String getCode() { return code; }
        public void setCode(String code) { this.code = code; }
        public String getAircraftType() { return aircraftType; }
        public void setAircraftType(String aircraftType) { this.aircraftType = aircraftType; }
        public String getAirlineCode() { return airlineCode; }
        public void setAirlineCode(String airlineCode) { this.airlineCode = airlineCode; }
        public Integer getStationNumber() { return stationNumber; }
        public void setStationNumber(Integer stationNumber) { this.stationNumber = stationNumber; }
        public String getRstn() { return rstn; }
        public void setRstn(String rstn) { this.rstn = rstn; }
        public String getCfsa() { return cfsa; }
        public void setCfsa(String cfsa) { this.cfsa = cfsa; }
        public String getTtwc() { return ttwc; }
        public void setTtwc(String ttwc) { this.ttwc = ttwc; }
        public String getMxlw() { return mxlw; }
        public void setMxlw(String mxlw) { this.mxlw = mxlw; }
        public String getRllw() { return rllw; }
        public void setRllw(String rllw) { this.rllw = rllw; }
    }

    public Meta getMeta() {
        return meta;
    }

    public void setMeta(Meta meta) {
        this.meta = meta;
    }

    public Crft getCrft() {
        return crft;
    }

    public void setCrft(Crft crft) {
        this.crft = crft;
    }
} 